home *** CD-ROM | disk | FTP | other *** search
- Path: netaxs.com!usenet
- From: bobpez@netaxs.com (Bob Pesavento)
- Newsgroups: comp.lang.c++
- Subject: STL
- Date: 20 Feb 1996 22:10:40 GMT
- Organization: Net Access
- Message-ID: <4gdgt0$494@netaxs.com>
- NNTP-Posting-Host: wyndmoor1-45.slip.netaxs.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.3
-
- I'm a newbie with STL and not an expert at C++ so bear with me. Assume a
- simplified class:
-
- class myclass
- {
- int myint;
- float myfloat;
-
- public:
-
- (the usual... constructors etc)
- };
-
- I want use "list" and stuff a bunch of these in using push_back. No
- problem so far. But I want the user to be able to select which item to
- sort on... myint or myfloat. What I have seen is that I can only set up
- for one using the operator < and operator ==. I don't want multiple
- lists. Can anyone give me an idea how to do this? Your help will be
- appreciated.
-
- my e-mail addresses are:
- bobpez@netaxs.com or Bob@chiinc.com
-
-